package ar.com.sne.cfg;

import org.zkoss.zul.Treecell;
import org.zkoss.zul.Window;

public class ImgLocationTree extends Window{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 291551326734421236L;
	//------------------------------------------------//
	//Logos para el contenido del arbol Facturacion
	public static String LOGO_FACTURACION_MEN = "logoFacturacionMensual";
	public static String LOGO_FACTURACION_CLI = "logoFacturacionCli";
	public static String LOGO_DEUDA_CLI = "logoDeudaCli";
	public static String LOGO_COBRAR_CLI = "logoCobrarCli";
	public static String LOGO_DEUDA_SUB = "logoDeudaSub";
	public static String LOGO_PAGO_SUB = "logoPagoSub";
	
	//Logos para el contenido del arbol Administracion
	public static String LOGO_MERCADERIA = "logoMercaderia";
	public static String LOGO_INGRESO = "logoIngreso";
	public static String LOGO_RETIRAR = "logoRetirar";
	public static String LOGO_MODIFICAR = "logoModificar";
	public static String LOGO_AUTORIZAR = "logoAutorizar";
	public static String LOGO_DESCARGAR = "logoDescargar";
	public static String LOGO_ASIGNAR = "logoAsignar";
	
	//Logos para el contenido del arbol Gestion de entregas
	public static String LOGO_ENTREGAS_ACTIVAS = "logoAsignar";
	public static String LOGO_REGISTRO_INGRESOS = "logoRegistroIngresosEntrega";
	public static String LOGO_RETIRAR_ENTREGA = "logoRetirarEntrega";
	public static String LOGO_MODIFICAR_ENTREGA = "logoModificarEntrega";
	public static String LOGO_AUTORIZAR_ENTREGA = "logoAutorizarEntrega";
	public static String LOGO_DESCARGAR_ENTREGA = "logoDescargarEntrega";
	public static String LOGO_ASIGNAR_ENTREGA = "logoAsignarEntrega";
	
	
	//Logos para el contenido del arbol Informes y Reportes
	public static String LOGO_DIARIO_ENTREGA = "logoDiarioEntrega";
	public static String LOGO_COMISIONES_PAGAR = "logoComisionesPagar";
	public static String LOGO_ESTADO_CUENTAS = "logoEstadoCuentas";
	
	//Logos para el contenido del arbol Estadisticas
	public static String LOGO_CRITERIOS_ESTADISTICAS = "logoEstadisticas";
	
	
	
	
	//Ids del arbol Facturacion
	public static String ID_FACTURACION_MEN="factMen";
	public static String ID_FACTURACION_CLI="factCli";
	public static String ID_DEUDA_CLI="deudaCli";
	public static String ID_COBRAR_CLI="cobrarCli";
	public static String ID_DEUDA_SUB="deudaSub";
	public static String ID_PAGO_SUB="pagoSub";
	
	//Ids del arbol Administracion
	public static String ID_MERCADERIA="merc";
	public static String ID_INGRESO="regIng";
	public static String ID_RETIRAR="retirar";
	public static String ID_MODIFICAR="modif";
	public static String ID_AUTORIZAR="auto";
	public static String ID_DESCARGAR="desc";
	public static String ID_ASIGNAR="asigCupo";
	
	//Ids del arbol Gestion de entregas
	public static String ID_ENTREGAS_ACTIVAS="entAct";
	public static String ID_REGISTRO_INGRESOS="regIngEnt";
	public static String ID_RETIRAR_ENTREGA="retEnt";
	public static String ID_MODIFICAR_ENTREGA="modifEnt";
	public static String ID_AUTORIZAR_ENTREGA="autoEnt";
	public static String ID_DESCARGAR_ENTREGA="descEnt";
	public static String ID_ASIGNAR_ENTREGA="asigCupoEnt";
	
	//Ids del arbol Informes y Reportes
	public static String ID_DIARIO_ENTREGA="diarioEnt";
	public static String ID_COMISIONES_PAGAR="comPagar";
	public static String ID_ESTADO_CUENTAS="estCuent";
	
	//Ids del arbol Estadisticas
	public static String ID_CRITERIOS_ESTADISTICAS="criterios";
	

	
	String ruta = "";
	
	
public void getLocation(String idTree, String idNodo) {
		
		//IMAGENES PARA FACTURACIONTREE
		if(idNodo.equalsIgnoreCase(ID_FACTURACION_MEN)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_FACTURACION_MEN);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_FACTURACION_MEN);
			treeCell.setImage(ruta);
			}
		
		if(idNodo.equalsIgnoreCase(ID_FACTURACION_CLI)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_FACTURACION_CLI);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_FACTURACION_CLI);
			treeCell.setImage(ruta);
			}
	
		if(idNodo.equalsIgnoreCase(ID_DEUDA_CLI)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_DEUDA_CLI);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_DEUDA_CLI);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_COBRAR_CLI)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_COBRAR_CLI);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_COBRAR_CLI);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_DEUDA_SUB)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_DEUDA_SUB);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_DEUDA_SUB);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_PAGO_SUB)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_PAGO_SUB);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_PAGO_SUB);
			treeCell.setImage(ruta);
			}
		
		//IMAGENES PARA ADMINISTRACIONTREE
		if(idNodo.equalsIgnoreCase(ID_MERCADERIA)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_MERCADERIA);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_MERCADERIA);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_RETIRAR)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_RETIRAR);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_RETIRAR);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_INGRESO)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_INGRESO);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_INGRESO);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_MODIFICAR)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_MODIFICAR);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_MODIFICAR);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_AUTORIZAR)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_AUTORIZAR);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_AUTORIZAR);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_DESCARGAR)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_DESCARGAR);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_DESCARGAR);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_ASIGNAR)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_ASIGNAR);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_ASIGNAR);
			treeCell.setImage(ruta);
			}
		
		//IMAGENES PARA GESTIONTREE
		if(idNodo.equalsIgnoreCase(ID_ENTREGAS_ACTIVAS)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_ENTREGAS_ACTIVAS);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_ENTREGAS_ACTIVAS);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_REGISTRO_INGRESOS)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_REGISTRO_INGRESOS);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_REGISTRO_INGRESOS);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_RETIRAR_ENTREGA)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_RETIRAR_ENTREGA);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_RETIRAR_ENTREGA);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_MODIFICAR_ENTREGA)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_MODIFICAR_ENTREGA);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_MODIFICAR_ENTREGA);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_AUTORIZAR_ENTREGA)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_AUTORIZAR_ENTREGA);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_AUTORIZAR_ENTREGA);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_DESCARGAR_ENTREGA)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_DESCARGAR_ENTREGA);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_DESCARGAR_ENTREGA);
			treeCell.setImage(ruta);			
			}
		if(idNodo.equalsIgnoreCase(ID_ASIGNAR_ENTREGA)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_ASIGNAR_ENTREGA);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_ASIGNAR_ENTREGA);
			treeCell.setImage(ruta);
			}
		
		//IMAGENES PARA REPORTESTREE
		if(idNodo.equalsIgnoreCase(ID_DIARIO_ENTREGA)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_DIARIO_ENTREGA);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_DIARIO_ENTREGA);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_COMISIONES_PAGAR)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_COMISIONES_PAGAR);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_COMISIONES_PAGAR);
			treeCell.setImage(ruta);
			}
		if(idNodo.equalsIgnoreCase(ID_ESTADO_CUENTAS)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_ESTADO_CUENTAS);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_ESTADO_CUENTAS);
			treeCell.setImage(ruta);
			}
		//IMAGENES PARA ESTADISTICASTREE
		if(idNodo.equalsIgnoreCase(ID_CRITERIOS_ESTADISTICAS)){
			ruta = ConfigurationImg.getInstance().getProperty(LOGO_CRITERIOS_ESTADISTICAS);
			Window win = (Window)getFellow(idTree);
			Treecell treeCell = (Treecell)win.getFellow(ID_CRITERIOS_ESTADISTICAS);
			treeCell.setImage(ruta);
			}
}


}
